import axios from '@/libs/request.js'

export const GetAlarmTypeStatistical = (month) => {
  return axios.request({
    method: 'get',
    url:
      '/api/ViolationsAlarm/GetAlarmTypeStatistical?' +
      'ProjectId=06879ca8-766b-448d-9173-b6a80605710e&SearchStratTime=&SearchEndTime=&month=' + month
  })
}

export const GetWeekAlarmTypeStatistical = () => {
  return axios.request({
    method: 'get',
    url:
      '/api/ViolationsAlarm/GetWeekAlarmTypeStatistical?' +
      'ProjectId=06879ca8-766b-448d-9173-b6a80605710e&AlarmType='
  })
}

export const GetViolationsAlarmList = (pagesize = 50) => {
  return axios.request({
    method: 'get',
    url:
      `/api/ViolationsAlarm/GetViolationsAlarmList?
      page=1&pagesize=${pagesize}&VideoId=&ProjectId=06879ca8-766b-448d-9173-b6a80605710e
      &ViolationsType=&SearchStratTime=&SearchEndTime=&identify=`
  })
}

export const PersongridinfoGet = () => {
  return axios.request({
    method: 'get',
    url:
      '/api/Persongridinfo/GetDatasToList?page=1&pageSize=50&' +
      'ProjectID=06879ca8-766b-448d-9173-b6a80605710e'
  })
}

export const PersoninfoGet = () => {
  return axios.request({
    method: 'get',
    url:
      '/api/Personinfo/GetDatasToList?page=1&pageSize=50&' +
      'ProjectID=06879ca8-766b-448d-9173-b6a80605710e'
  })
}

export const GetDataByStationId = stationId => {
  return axios.request({
    url: '/api/monitor/IMCommon/GetDataByStationId?StationId=' + stationId,
    method: 'get'
  })
}

export const BluetoothPositioning = value => {
  return axios.request({
    url:
      'http://58.49.74.231:118/api/monitor/BluetoothPositioning/GetGridPersionData?' +
      'stationid=3202&col=col0&value=' +
      value,
    method: 'get'
  })
}

export const GetStationDataByCol = (startValue, endValue) => {
  return axios.request({
    url:
      'http://58.49.74.231:118/api/monitor/IMCommon/GetStationDataByCol?' +
      'StationId=3205&col=col0&startValue=' +
      startValue +
      '&endValue=' +
      endValue,
    method: 'get'
  })
}

export const GetPersonnelWageStatistics = (month) => {
  return axios.request({
    url:
      '/api/SalaryManager/GetPersonnelWageStatistics/GetPersonnelWageStatistics?' +
      'projectid=06879ca8-766b-448d-9173-b6a80605710e&date=' + month,
    method: 'get'
  })
}
